<?php 
/*
* tag页面
*/

require_once 'init.php';
define('TEMPLATE_PATH', TPLS_PATH.Option::get('nonce_templet').'/');//前台模板路径
$CACHE = Cache::getInstance();
$options_cache = $CACHE->readCache('options');
extract($options_cache);
$navibar = unserialize($navibar);
$curpage = CURPAGE_HOME;
$blogtitle = $blogname .'- 标签';
include View::getView('header');
?>

<?php
        global $CACHE;
        $tag_cache = $CACHE->readCache('tags');?>
        <div class="widget widget_tag_cloud">
        <h3><span onclick="showhidediv('blogtags')"><?php echo $title; ?></span></h3>
        <ul id="blogtags">
        <li>
        <?php shuffle($tag_cache);foreach($tag_cache as $value): $color = dechex(rand(0,16777215)); ?>
                <span style="font-size:<?php echo $value['fontsize']; ?>pt; height:30px;">
                <a href="<?php echo Url::tag($value['tagurl']); ?>" title="<?php echo $value['usenum']; ?> 篇日志" style="color:#<?php echo $color; ?>"><?php echo $value['tagname']; ?></a></span>
        <?php endforeach; ?>
        </li>
        </ul>
        </div>
<?php
 include View::getView('footer');
?>
